<?php
header('Cache-Control: no-cache, no-store, must-revalidate, post-check=0, pre-check=0'); 
header('Pragma: no-cache'); 
header('Content-Type: application/x-msexcel; charset=windows-1251; format=attachment;'); 
header('Content-Disposition: attachment; filename=reseller.xls');
?>

<table border="2" cellpadding="0" cellspacing="0"  width="100%">
  <tr>
    <th width="17%">Site Id</th>
    <th width="17%">Name</th>
    <th width="17%">e-mail</th>
    <th width="17%">Contact No.</th>
    <th width="17%">Mobile No.</th>
    <th width="15%">Address</th>
  </tr> 

<?php
include_once("ClsSebent/config.php");
$sql="Select * from reseller order by site_id";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res))
{
	$siteid=$row["site_id"];
	$name=$row["title"]." ".$row["fname"];
	$eml=$row["email"];
	$contact=$row["phone_no"];
	$mobile=$row["mobile_no"];	$Address="&nbsp;".$row["adress1"]."&nbsp;<BR>".$row["adress1"]."&nbsp;<BR>".$row["city"]."&nbsp;<BR>".$row["province"]."&nbsp;<BR>".$row["country"]."&nbsp;<BR>Zip:".$row["zip"];
	echo"<tr>";
	echo"<td width=\"17%\">&nbsp;".$siteid."</td>";
    echo"<td width=\"17%\">&nbsp;".$name."</td>";
    echo"<td width=\"17%\">&nbsp;".$eml."</td>";
    echo"<td width=\"17%\">&nbsp;".$contact."</td>";
    echo"<td width=\"17%\">&nbsp;".$mobile."</td>";
    echo"<td width=\"15%\">&nbsp;".$Address."</td>";    
	echo"</tr>";
}   
?>
</TABLE>
